package model

import (
	"gorm.io/gorm"
	"time"
)

type UserFollow struct {
	Id         uint32         `gorm:"column:id;type:int UNSIGNED;comment:关系ID;primaryKey;not null;" form:"id" json:"id"`  // 关系ID
	UserId     int32          `gorm:"column:user_id;type:int;comment:用户ID;not null;" form:"user_id" json:"user_id"`       // 用户ID
	FollowId   int32          `gorm:"column:follow_id;type:int;comment:好友ID;not null;" form:"follow_id" json:"follow_id"` // 好友ID
	CreatedAtd time.Time      `gorm:"column:created_atd;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" form:"created_atd" json:"created_atd"`
	UpdatedAt  time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" form:"updated_at" json:"updated_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" form:"deleted_at" json:"deleted_at"`
}

func (f *UserFollow) TableName() string {
	return "user_follow"
}
